Is it possible to create a dxl which sets the enumeration attribute value in formal module from webservice.
TTL1 - Thu Nov 29 03:06:01 EST 2018 |
Re: DXL to get Webservice output in the enumeration attribute values You can make the following HTTP requests in DXL: The HttpVerb is an enumeration that represents the type of HTTP request: HttpDelete HttpGet HttpHead HttpPut HttpPost I have had some success using them. Refer to the DXL reference manual for more information.
|
Re: DXL to get Webservice output in the enumeration attribute values davidcs - Thu Nov 29 07:43:53 EST 2018 You can make the following HTTP requests in DXL: The HttpVerb is an enumeration that represents the type of HTTP request: HttpDelete HttpGet HttpHead HttpPut HttpPost I have had some success using them. Refer to the DXL reference manual for more information.
Hello David,
Thanks for the reply, could you provide us some example of how exactly we can use those in our enumeration type attributes. Because, in the DXL reference document 9.6.1, I couldn't found any related information for our requirement.
|
Re: DXL to get Webservice output in the enumeration attribute values The installation directory in DOORS has an example using GET. lib\dxl\example\oslc\sample_get.dxl This sample is setup for OSLC, so you may have to modify the HTTP header to make it work for whichever web service you are using. The concept is you do a GET it will return some data, probably XML, you parse that data for information and assign it to an attribute in DOORS. |
Re: DXL to get Webservice output in the enumeration attribute values I've used DXL Services and OSLC for doors 9.6, and i'm not very impressed with the reliability of either to be honest. I would suggest implementing a little webservice wrapper that wraps doors in batch mode, that way you have complete control of what goes on, and you don't need to worry about DWA making life difficult for you.
I've created such a wrapper in C#, super simple i think its like...100-200 lines in total, and it simply creates a new dxl script file for each request and inserts what script its supposed to run. method header: public string RunScript(string username, string password, string scriptName, string parameters) //create dxl file //run doors in batch mode with parameters such as username and what dxl file to run //clean up and return the result
The idea is that you then have (just like DXL Services) a dxl file somewhere, that can be loaded and executed through this little wrapper dxl that is generated by the webservice. If you are interested i can post the code for it. |
Re: DXL to get Webservice output in the enumeration attribute values OticonMTEG - Fri Nov 30 07:39:24 EST 2018 I've used DXL Services and OSLC for doors 9.6, and i'm not very impressed with the reliability of either to be honest. I would suggest implementing a little webservice wrapper that wraps doors in batch mode, that way you have complete control of what goes on, and you don't need to worry about DWA making life difficult for you.
I've created such a wrapper in C#, super simple i think its like...100-200 lines in total, and it simply creates a new dxl script file for each request and inserts what script its supposed to run. method header: public string RunScript(string username, string password, string scriptName, string parameters) //create dxl file //run doors in batch mode with parameters such as username and what dxl file to run //clean up and return the result
The idea is that you then have (just like DXL Services) a dxl file somewhere, that can be loaded and executed through this little wrapper dxl that is generated by the webservice. If you are interested i can post the code for it. Thank you Martin,
It be very helpful if you post the code for this one. So, that we can make use it as a reference to implement our requirement.
|
Re: DXL to get Webservice output in the enumeration attribute values davidcs - Fri Nov 30 07:28:24 EST 2018 The installation directory in DOORS has an example using GET. lib\dxl\example\oslc\sample_get.dxl This sample is setup for OSLC, so you may have to modify the HTTP header to make it work for whichever web service you are using. The concept is you do a GET it will return some data, probably XML, you parse that data for information and assign it to an attribute in DOORS. Thank you David, I got that example and will be working on that how we can use this example for our web service.
|
Re: DXL to get Webservice output in the enumeration attribute values TTL1 - Sat Dec 01 03:59:05 EST 2018 Thank you Martin,
It be very helpful if you post the code for this one. So, that we can make use it as a reference to implement our requirement.
Its made as a wcf service, so the service class looks like this:
using System;
namespace DOORSWebServiceInterface
} and then the doorsbatch manager class looks like t
using System;
namespace DOORSWebServiceInterface
var stream = File.CreateText(tempScriptPath);
//"-k -data 36677@servernameofdoors"
System.Diagnostics.ProcessStartInfo procStartInfo = new System.Diagnostics.ProcessStartInfo(pathToDoors, paramString);
procStartInfo.RedirectStandardOutput = true; }
private void cleanup(string basePath, string guid)
and then the convention is that the dxl file contains a method named the same as the file its in, and it returns a string (basically the same methodology as used by dxl services) |